package by.euanpa.android.grodnobusstop.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import by.euanpa.android.grodnobusstop.ui.bs.all.AllBusStopFragment;
import by.euanpa.android.grodnobusstop.ui.bs.near.NearBusStopFragment;

public class BusStopPagerAdapter extends FragmentPagerAdapter {

	public BusStopPagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int i) {
		switch (i) {
		case 0:
			return new NearBusStopFragment();
		default:
			return new AllBusStopFragment();
		}
	}

	@Override
	public int getCount() {
		return 2;
	}

	public CharSequence getPageTitle(int position) {
		return "OBJECT " + (position + 1);
	}
}
